/*
 *
 *  *
 *  *  *
 *  *  *  * Copyright 2019-2022 the original author or authors.
 *  *  *  *
 *  *  *  * Licensed under the Apache License, Version 2.0 (the "License");
 *  *  *  * you may not use this file except in compliance with the License.
 *  *  *  * You may obtain a copy of the License at
 *  *  *  *
 *  *  *  *      https://www.apache.org/licenses/LICENSE-2.0
 *  *  *  *
 *  *  *  * Unless required by applicable law or agreed to in writing, software
 *  *  *  * distributed under the License is distributed on an "AS IS" BASIS,
 *  *  *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  *  *  * See the License for the specific language governing permissions and
 *  *  *  * limitations under the License.
 *  *  *
 *  *
 *
 */

package cn.zhz.springdoc.springboot.config.v3;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.springdoc.core.*;
import org.springframework.beans.factory.ObjectFactory;

import java.util.List;

/**
 * The type Multiple open api resource.
 *
 * @author bnasslahsen
 */
public class CustomerMultipleOpenApiWebMvcResource extends CustomerMultipleOpenApiResource {

    /**
     * Instantiates a new Multiple open api resource.
     *
     * @param groupedOpenApis           the grouped open apis
     * @param defaultOpenAPIBuilder     the default open api builder
     * @param requestBuilder            the request builder
     * @param responseBuilder           the response builder
     * @param operationParser           the operation parser
     * @param springDocConfigProperties the spring doc config properties
     * @param springDocProviders        the spring doc providers
     */
    public CustomerMultipleOpenApiWebMvcResource(List<GroupedOpenApi> groupedOpenApis, ObjectFactory<OpenAPIService> defaultOpenAPIBuilder, AbstractRequestService requestBuilder, GenericResponseService responseBuilder, OperationService operationParser, SpringDocConfigProperties springDocConfigProperties, SpringDocProviders springDocProviders) {
        super(groupedOpenApis, defaultOpenAPIBuilder, requestBuilder, responseBuilder, operationParser, springDocConfigProperties, springDocProviders);
    }


    public String openapiJson(String group)
            throws JsonProcessingException {
        return getOpenApiResourceOrThrow(group).openapiJson();
    }


}
